<template>
	<view>
		<!-- 自定义套餐充值组件 -->
		<rechargelist :tv_name="tv_name" :recharge="recharge"></rechargelist>
	</view>
</template>

<script>
	const db = uniCloud.database();
	import rechargelist from '@/components/rechargelist/rechargelist.vue';
	
	export default {
		components: {
			rechargelist
		},
		data() {
			return {
				tv_name: "",
				recharge: [],
			}
		},
		async onLoad() {
			if (!vk.vuex.get('$user.userInfo._id')) {
				uni.reLaunch({
					url: "/pages/index/index"
				})
			}

			vk.showLoading('加载中...');
			const rechargeList = await db.collection('a_config').where({
				name: "youhui",
			}).get()
			this.recharge.push(rechargeList.result.data[0])
			vk.hideLoading();
		},
		methods: {

		}
	}
</script>

<style>
	page {
		/* background-color: #d3fe4d; */
		background-color: #e2e2e2;
	}
</style>
